package com.hotel.homehotel.before.entiy.vo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.hotel.homehotel.before.entiy.Reply;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommentVo {

    @ApiModelProperty(value = "评论id")
    @TableId(value = "comment_id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "评论内容")
    @TableField("comment_content")
    private String content;

    @ApiModelProperty(value = "评论所属房间id")
    @TableField("comment_room_id")
    private String roomId;

    @ApiModelProperty(value = "评论用户")
    @TableField("comment_from_uid")
    private String uid;


    @ApiModelProperty(value = "创建时间",example = "2019-01-01 8:00:00")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @JsonIgnore
    @ApiModelProperty(value = "逻辑删除 1（true）已删除， 0（false）未删除")
    @TableLogic
    private Integer isDeleted;


    @ApiModelProperty(value = "创建者")
    private String createdBy;


    @ApiModelProperty(value = "该评论下的二级评论")
    private List<Reply> replies;


}
